Tidy use of module / package names.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 21 Nov 2005 17:34:25 +0000 (18:34 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 21 Nov 2005 17:34:25 +0000 (18:34 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/lowlevel/xs/xs.c

index 0b623a6a8fe3842b99615bc89464deb81bde9559..e473a4902bcc46ff28f6265c7dd75971bfa741c1 100644 (file)
@@ -41,7 +41,8 @@
 #define PyMODINIT_FUNC DL_EXPORT(void)
 #endif
 
-#define PYPKG    "xen.lowlevel.xs"
+#define PKG "xen.lowlevel.xs"
+#define CLS "xs"
 
 /** Python wrapper round an xs handle.
  */
@@ -847,7 +848,7 @@ static void xshandle_dealloc(XsHandle *self)
 static PyTypeObject xshandle_type = {
     PyObject_HEAD_INIT(NULL)
     0,
-    "xen.lowlevel.xs.xs",
+    PKG "." CLS,
     sizeof(XsHandle),
     0,
     (destructor)xshandle_dealloc, /* tp_dealloc        */
@@ -895,13 +896,13 @@ PyMODINIT_FUNC initxs(void)
     if (PyType_Ready(&xshandle_type) < 0)
         return;
 
-    m = Py_InitModule("xen.lowlevel.xs", xs_methods);
+    m = Py_InitModule(PKG, xs_methods);
 
     if (m == NULL)
       return;
 
     Py_INCREF(&xshandle_type);
-    PyModule_AddObject(m, "xs", (PyObject *)&xshandle_type);
+    PyModule_AddObject(m, CLS, (PyObject *)&xshandle_type);
 }